/*
 * BarListModel.java
 *
 * Created on 4 de noviembre de 2006, 20:01
 *
 */

package cheers.gui.bar;

import javax.swing.AbstractListModel;
import cheers.model.Bar;
import cheers.service.BarService;

/**
 *
 * @author Santiago Hirschfeld
 */
public class BarListModel extends AbstractListModel{
    
    private BarService barService = null;
    
    public BarListModel() {
    }

    public void setBarService(BarService bs) {
        this.barService = bs;
    }
    
    public int getSize() {
        return barService.getNumberOfBars();
    }

    public Bar getElementAt(int i) {
        return barService.getAllBars().get(i);
    }
    
}
